<template>
    <div class="default"></div>
</template>

<script>
export default {
    data(){
        return{}
    },
    mounted(){
        let pageTo;
        let toUserPage = "../../pages/payment/main";
        let toOperPage = "../../pages/Operation/main";
        let userId = wx.getStorageSync('user_id');
        let userToken = wx.getStorageSync('user_token');
        let role = wx.getStorageSync('role');
        if(userId && userToken && role){
            role == '1' ? pageTo = toUserPage : pageTo = toOperPage;
            wx.reLaunch({
                url: pageTo
            });
        }else{
            wx.reLaunch({
                url: "../../pages/UserLogin/main"
            });
        }
    },
}
</script>
